M2M (machine to machine) is an abbreviation for machine to machine communication, and is, in a narrow sense, implementation of data exchange between machines through short distance communication technologies, such as Zigbee (that is, IEEE 802.15.4 protocol) and WLAN (Wireless Local Area Networks), and long distance wireless communication technologies, such as GSM (Global System for Mobile Communications)/GPRS (General Packet Radio Service), UMTS (Universal Mobile Telecommunications System)/HSDPA (High Speed Downlink Packet Access), CDMA (Code Division Multiple Access)/EVDO (Evolution-Data Only). In brief, all machines in the world could be incorporated into one communication network, so that all the machines are intellectualized. In a broad sense, the M2M also includes human to machine communication and machine to human communication.
Application of the M2M grows very rapidly in the market of vertical industries. These vertical industries include smart home, security monitoring, electronic healthcare, retailing, and logistics monitoring. Because of the lack of a uniform M2M standard, application of the M2M to the vertical industries is generally that a vendor provides an end-to-end solution, so that a device and an application are strongly coupled, which results in a high deployment cost. Besides, massively deployed vertical applications of the M2M form isolated information islands independent of one another, which makes it difficult to share information, thereby easily causing redundant construction. All of these unfavorable factors considerably hinder further development of the vertical applications of the M2M. Therefore, it is necessary to construct a horizontal platform of the M2M, so as to achieve information sharing and reduce the deployment cost of the M2M, thereby further promoting extensive application of the M2M.
A REST (Representational State Transfer) style is a design and development mode for a network application, and is extensively applied to the current Internet. What needs to be done by the M2M is to connect an object to the Internet to form an Internet of things. Therefore, it is a natural choice to use a REST style interface in the M2M. A foundation of the REST style is representation of a resource. Resources in the M2M may be statically stored data, for example, historical measurement data, and may also be dynamic processing programs, for example, instant measurement data. Some of these resources may be rapidly accessed on the M2M platform by the network application, for example, the historical measurement data. Some of these resources must be stored on a device, for example, a resource for controlling the device. For some resources, it needs to be determined, according to a situation of the device, whether the resources are to be stored on the M2M platform or on the device. For example, for latest measurement data of the device, if the device reports the latest measurement data to the platform based on a change of the measurement data, the latest measurement data may be stored on the M2M platform. If the device receives an instant measurement data command and reports the latest measurement data, the latest measurement data resource must be stored on the device.
Currently, a possible method for the network application to perform an operation on a resource through the M2M platform is: A client end requests the resource from a front end management server. The front end management server performs an authorization check through an authorization management server. After the request passes the authorization check, if the front end management server determines that it is indicated in a requested URI (Uniform Resource Identifier) that the resource identifier is an indirect access resource identifier, it needs to find where the resource really is, and accordingly transmit the indirect access resource identifier to a location management server to request acquiring a real resource identifier. The URI containing an indirect access resource identifier is, for example, HTTP://Front_End_MGR/Flag/Obscured_Resource_MGR_ID/Resource_On_MGR, where “Flag/” indicates that the indirect access resource identifier is “Obscured_Resource_MGR_ID”. Subsequently, the location management server finds the corresponding real resource identifier according to the indirect access resource identifier, and returns the corresponding real resource identifier to the front end management server. The front end management server requests acquiring the resource from a back end management server, where the request contains the real resource identifier. The back end management server constructs a request according to the real resource identifier, and requests acquiring the corresponding resource from a resource management server. The resource management server returns the resource, which is requested by the back end management server and is corresponding to the URI. The back end management server returns, to the front end management server, the resource acquired from the resource management server. Finally, the front end management server returns, to the client end, the resource returned by the back end management server.
In the above method, the organizational structure of the URI for directly acquiring the resource is different from that of the URI for indirectly acquiring the resource, where the URI for indirectly acquiring the resource needs to have indicators, such as “Flag/”, so as to indicate that the URI is a URI for indirectly acquiring a resource. In the M2M, data of the same type may be stored on the platform, and may also be stored on the device. If the above method is applied to the M2M, when network applications request a resource from the M2M platform together, the network applications need to face different URI organizational structures. For example, for the same resources that are the latest measurement data, it is possible that a certain device reports the resource to the M2M platform when the data is changed, and then the corresponding resource is on the platform; while another device may receive an instant measurement command and return a measurement value, and then the corresponding resource is on the device. Therefore, for resources of the same type on different devices, the organizational structures of the URIs for acquiring the resources are different. In this case, the network application needs to first acquire beforehand the URI of the resource through searching, and then the network application can request the M2M platform for performing an operation on a certain resource, which increases processing complexity of the network application and is unfavorable for promoting extensive application of the M2M.